<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"> 

<h:head>	
<title>Universidade de Brasilia FGA</title>
</h:head>

<h:body>
    <p:panel id="panel1">
<center>
<p:graphicImage value="imagens/gama_header1.png"/>

<h1>#{msgs.campoCabecalho}</h1>  
<h3>#{msgs.campoApresentacao}</h3>
<h4>#{msgs.campoPagina1}</h4>
<h:form>

  <p:panel id="panel" style="margin-bottom:30px;">  
   
        <h:panelGrid columns="1"> 
         
         <h:panelGroup>
            <h:outputLabel for="nome" value="#{msgs.campoNome}:" />  
            <p:inputText id="nome"   
                value="#{alunoBean.aluno.nome}" required="true" label="Nome">  
                <f:validateLength minimum="2" />  
            </p:inputText>
            <p:message for="nome" />
            </h:panelGroup>
            
            <!-- Observe que para aparecer um 'vermelhinho' em um campo obrigatorio vc precisa
            dos atributos required e requiredMessage -->
            <h:panelGroup>
            <h:outputLabel value="#{msgs.campoMatricula}:" />  
            <p:inputMask mask="99/9999999" size="10" id="matricula" requiredMessage="Por favor, informe a matrícula"
                value="#{alunoBean.aluno.matricula}" required="true">   
            </p:inputMask>
            <p:message for="matricula" />
            </h:panelGroup>
              
           <h:panelGroup>
            <h:outputLabel for="dataDeNascimento" value="#{msgs.campoDatadenascimento}:" /> 
			<p:calendar value="#{alunoBean.aluno.datadenascimento}" showButtonPanel="true"/>
			</h:panelGroup>
            
            <h:panelGrid columns="2"> 
            <h:outputText value="#{msgs.campoSexo}: " />  
            <h:selectOneRadio value="#{alunoBean.aluno.sexo}">  
            <f:selectItem itemLabel="#{msgs.campoMasculino}" itemValue="M" />  
            <f:selectItem itemLabel="#{msgs.campoFeminino}" itemValue="F" />  
           </h:selectOneRadio>  
            </h:panelGrid>  
	
            <h:panelGroup>
            <h:outputLabel for="ufenderecoaluno" value="#{msgs.campoUf}:" /> 
            <h:selectOneMenu value="#{alunoBean.aluno.ufenderecoaluno}" label="uf" 
                id="ufenderecoaluno" styleClass="input-select"   
               >  
                  
            <f:selectItem itemLabel=" -- " itemValue="" />  
                <f:selectItem itemLabel=" AC " itemValue="AC" />  
                <f:selectItem itemLabel=" AL " itemValue="AL" /> 
                <f:selectItem itemLabel=" AP " itemValue="AP"/> 
                <f:selectItem itemLabel=" AM " itemValue="AM"/> 
                <f:selectItem itemLabel=" BA " itemValue="BA"/> 
                <f:selectItem itemLabel=" CE " itemValue="CE"/> 
                <f:selectItem itemLabel=" DF " itemValue="DF"/> 
                <f:selectItem itemLabel=" ES " itemValue="ES"/> 
                <f:selectItem itemLabel=" GO " itemValue="GO"/> 
                <f:selectItem itemLabel=" MA " itemValue="MA"/> 
                <f:selectItem itemLabel=" MT " itemValue="MT"/> 
                <f:selectItem itemLabel=" MS " itemValue="MS"/> 
                <f:selectItem itemLabel=" MG " itemValue="MG"/> 
                <f:selectItem itemLabel=" PA " itemValue="PA"/> 
                <f:selectItem itemLabel=" PB " itemValue="PB"/> 
                <f:selectItem itemLabel=" PR " itemValue="PR"/> 
                <f:selectItem itemLabel=" PE " itemValue="PE"/> 
                <f:selectItem itemLabel=" PI " itemValue="PI"/> 
                <f:selectItem itemLabel=" RR " itemValue="RR"/> 
                <f:selectItem itemLabel=" RO " itemValue="RO"/> 
                <f:selectItem itemLabel=" RJ " itemValue="RJ"/> 
                <f:selectItem itemLabel=" RN " itemValue="RN"/> 
                <f:selectItem itemLabel=" RS " itemValue="RS"/> 
                <f:selectItem itemLabel=" SC " itemValue="SC"/> 
                <f:selectItem itemLabel=" SP " itemValue="SP"/> 
                <f:selectItem itemLabel=" SE " itemValue="SE"/>
                <f:selectItem itemLabel=" TO " itemValue="TO"/> 
                       
            </h:selectOneMenu>   
            <p:message for="ufenderecoaluno" />
            </h:panelGroup>
            
            <h:panelGroup>
            <h:outputLabel for="logradouroEnderecoAluno" value="#{msgs.campoLogradouro}:" />  
            <p:inputText id="logradouroEnderecoAluno"   
                value="#{alunoBean.aluno.logradouroenderecoaluno}" required="true" label="Logradouro"/>
            <p:message for="logradouroEnderecoAluno" />
            </h:panelGroup>
            
            <h:panelGroup>
            <h:outputLabel for="numero" value="#{msgs.campoNumero}:" />  
            <p:inputText size="4" id="numero"   
                value="#{alunoBean.aluno.numeroenderecoaluno}" required="true" label="Numero"/>  
            <p:message for="numero" />
            </h:panelGroup>
            
            <h:panelGroup>
            <h:outputLabel for="complemento" value="#{msgs.campoComplemento}:" />  
            <p:inputText id="complemento"   
                value="#{alunoBean.aluno.complementoenderecoaluno}" required="true" label="Complemento"/>  
            <p:message for="complemento" /> 
            </h:panelGroup>
            
            <h:panelGroup>
            <h:outputLabel for="bairro" value="#{msgs.campoBairro}:" />  
            <p:inputText id="bairro"   
                value="#{alunoBean.aluno.bairrodistritoregiaoadministrativoaluno}" required="true" label="Bairro"/>  
            <p:message for="bairro" /> 
            </h:panelGroup> 
            
            <h:panelGroup>
            <h:outputLabel for="municipio" value="#{msgs.campoMunicipio}:" />  
            <p:inputText id="municipio"   
                value="#{alunoBean.aluno.municipioenderecoaluno}" required="true" label="Municipio"/> 
            <p:message for="municipio" /> 
            </h:panelGroup> 
            
            <h:panelGrid columns="2"> 
            <h:panelGroup>
            <h:outputLabel for="ddd" value="DDD:" />  
            <p:inputMask id="ddd" mask="99" size="2"
                value="#{alunoBean.aluno.telefonefixodddaluno}"  label="ddd"/> 
            <p:message for="ddd" /> 
            </h:panelGroup>

            <h:panelGroup>            
            <h:outputLabel for="telefoneFixo" value="#{msgs.campoTelefonefixo}:" />  
            <p:inputMask id="telefoneFixo" mask="99999999" size="8" 
                value="#{alunoBean.aluno.telefonefixoaluno}"  label="Telefone Fixo"/> 
            <p:message for="telefoneFixo" /> 
            </h:panelGroup>
                
            <h:panelGroup>
            <h:outputLabel for="ddd2" value="DDD:" />  
            <p:inputMask id="ddd2" mask="99" size="2"
                value="#{alunoBean.aluno.telefonemoveldddaluno}"  label="ddd2"/> 
            <p:message for="ddd2" /> 
            </h:panelGroup>
                
            <h:panelGroup>
            <h:outputLabel for="telefonemovelaluno" value="#{msgs.campoTelefonemovel}:" />  
            <p:inputMask id="telefonemovelaluno"  mask="99999999" size="8" 
                value="#{alunoBean.aluno.telefonemovelaluno}" required="true" label="Telefone Celular"/>  
            <p:message for="telefonemovelaluno" /> 
            </h:panelGroup>
    
                
            </h:panelGrid> 
            
            
            <h:panelGroup>
            <h:outputLabel for="cep" value="#{msgs.campoCep}:" />  
            <p:inputMask id="cep" mask="99.999-999" size="10"  
                value="#{alunoBean.aluno.cependerecoaluno}" required="true" label="CEP"/> 
            <p:message for="cep" /> 
            </h:panelGroup> 
             
         
            
     		<p:commandButton value="#{msgs.campoBotaoProximo}" ajax="false" action="tela2.xhtml" /> 
     		<p:commandButton id="salvar" actionListener="#{alunoBean.salvar()}" update="panel,resultado" 
                             image="ui-icon ui-icon-disk" title="Salvar" process="@this,panel"/>
                <p:commandButton id="novo" actionListener="#{tipoAdmissaoBean.criar()}" update="panel,resultado" 
                             image="ui-icon ui-icon-document" title="Novo" process="@this"/>
        </h:panelGrid>  	
    </p:panel> 
    <hr size="8" width="50%" />
<h6>#{msgs.campoEnderecoUnB}</h6>
</h:form>
</center>
</p:panel>
</h:body>
</html>